﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DynCMS.NET.Infrastructure.IOC.MVC
{
    public class ModelMetadataProvider : System.Web.Mvc.ModelMetadataProvider
    {
        public override IEnumerable<System.Web.Mvc.ModelMetadata> GetMetadataForProperties(object container, Type containerType)
        {
            IEnumerable<System.Web.Mvc.ModelMetadata> result = new List<System.Web.Mvc.ModelMetadata>();

            return result;
        }

        public override System.Web.Mvc.ModelMetadata GetMetadataForType(Func<object> modelAccessor, Type modelType)
        {
            System.Web.Mvc.ModelMetadata result = new System.Web.Mvc.ModelMetadata(this, modelType, modelAccessor, typeof(object), modelAccessor.Method.Name);

            return result;
        }

        public override System.Web.Mvc.ModelMetadata GetMetadataForProperty(Func<object> modelAccessor, Type containerType, string propertyName)
        {
            System.Web.Mvc.ModelMetadata result = new System.Web.Mvc.ModelMetadata(this, containerType, modelAccessor, typeof(object), propertyName);

            return result;
        }
    }
}